package org.lemma.number;

import javax.annotation.Author;
import javax.annotation.Copyright;
import javax.annotation.Version;

/**
 * <p>
 * A <dfn>Numeric</dfn> is an abstract idea that extends the concept quantity
 * (i.e., counting and/or measuring) obtained through computation.
 * </p>
 * <p>
 * A <dfn>Numeric</dfn> is distinguished from a {@linkplain Cardinal cardinal}
 * in that a cardinal denotes the size of a {@linkplain experimental.set.Set set}
 * and thus is a generalization of counting while a number is a synthetic concept
 * that is a generalization of computation (e.g., taking the ratio of cardinals).
 * </p>
 * <p>
 * A symbol which represents a number is called a {@linkplain Digit digit}, but
 * in common usage the word number is used for both the idea and the symbol.
 * </p>
 * <p>
 * Newton defined number, and the relationship between quantity and number,
 * in the following terms: "By <dfn>number</dfn> we understand not so much a
 * multitude of unities, as the abstracted ratio of any quantity to another
 * quantity of the same kind, which we take for unity" (Newton, 1728).
 * </p>
 *
 * <div class="references">
 *  <cite>
 *  "Numeric." <i>Wikipedia, The Free Encyclopedia</i>. 14 Aug 2007, 11:21 UTC.
 *  Wikimedia Foundation, Inc.  14 Aug 2007
 *  <a href="http://en.wikipedia.org/w/index.php?title=Numeric&amp;oldid=151149955">
 *  http://en.wikipedia.org/w/index.php?title=Numeric&amp;oldid=151149955</a>
 *  </cite>
 * </div>
 *
 * @author Chris Beatty [christopher.beatty@gmail.com]
 * @version 1.0.0
 */
@Version (
    major="1", minor="0", patch="0", 
    date="Jun 16, 2008 1:58:42 PM",
    authors = {
        @Author (name="Chris Beatty", email="christopher.beatty@gmail.com")
    }
) @Copyright 
public interface Numeric {
    
    /**
     * The property of a {@code Numeric} of being positive, negative or neither
     */
    public enum Sign {

         Positive('\u002B'), Negative('\u2212'), None('\u200B');

         /**
          * The symbolic representation of this {@code Sign} 
          */
         private Character symbol;

         /**
          * Enum constructor
          */
         private Sign(Character c) {
            if(c != null)  {
                this.symbol = c;
            } else {
                throw new IllegalArgumentException("NULL symbol");
            }
         }

        /**
         * {@inheritDoc}
         *
         * @return {@inheritDoc}
         */         
         @Override public String toString() {
             return Character.toString(this.symbol);
         }
     }
    
    /**
     * Returns the {@code Sign} of this {@code Numeric}
     *
     * @return A {@code Sign}
     */
    public Sign sign();

}
